Hamilton headed Max Verstappen and Lando Norris to the flag in a race hit by changeable conditions.
The key moments for McLaren were an early call to leave Oscar Piastri on track, costing him 20 seconds in the process, and a call for soft tyres in the final stint for Norris.
The latter was a decision that likely cost him victory as he fell behind Hamilton as he exited the lane, and fell behind a resurgent Verstappen in the final laps.
Piastri recovered to fourth while Daniel Ricciardo was 13th at the flag.
At the end of the warmup lap, Pierre Gasly dived into the lane from last one the grid.
With Perez starting from the pit lane, it left 18 cars on the grid, Esteban Ocon the last of them with George Russell at the front.
At the race start, Russell got the jump to lead Hamilton from Lando Norris and Max Verstappen as Oscar Piastri slotted in fifth.
Norris lost out at The Loop, the Red Bull Racing driver going around the outside of the McLaren driver to move up to third.
The Mercedes duo headed Verstappen at the end of the opening lap, followed by the two McLarens, the leading five covered by less than three seconds.
A lap later, the leading duo were just clear of DRS range of the Red Bull Racing threat behind, with Norris also out of range in fourth.
The early stages played out well for Russell, who eased away from Hamilton in second, who in turn had pulled away from Verstappen.
The Dutchman had Norris and Piastri for company, the pair moving back into DRS range, and just clear of threat from Carlos Sainz in sixth.
In the pack. Ricciardo ran 15th, where he’d started, surviving the melee around him on the opening lap.
Nico Hulkenberg was embroiled in that early drama, running off the track as he slipped back to ninth on the opening lap after starting sixth.
Rain was forecast, teams advising their drivers it would start sometime before Lap 20, arriving at Stowe.
That was bad news for the soft tyre runners, namely Ocon and Zhou Guanyu, who began to run out of rubber around Lap 10.
With the exception of those two, and Perez on hard tyres from the pit lane, the remainder of the field were on medium tyres.
As he started Lap 15, race leader Russell radioed that he was seeing light rain.
Behind him, Norris had begun to challenge Verstappen, the McLaren driver having spent the previous 10 laps managing his car.
The Brit passed into Stowe in a move that witnessed no resistance from the Red Bull.
Soon after that move was completed, the crowd began to don their ponchos in a clear sign the rain was beginning to fall.
On Lap 17, Piastri repeated his team-mate’s move to pass Verstappen.
The conditions had deteriorated slightly as the Australian ran wide, doing well to remain on the racing surface.
Out front, Russell had seen his advantage disappear, with Hamilton closing in as they completed Lap 18.
Down Hangar Straight, Hamilton used DRS to breeze by and claim the lead by the time they reached Stowe.
The pair were off the road at Abbey as rain began to fall, Russell losing a place to Norris at The Loop as he fell from first to third inside a lap.
The increasing rain saw race control disable DRS on Lap 19.
It hardly slowed Norris who quickly bridged across to Hamilton, driving up the inside into Abbey.
Hamilton then came under pressure from Russell, who lost out to Piastri around the outside of The Loop and Aintree.
The Australian quickly latched on to the seven-time champion in second, biding his time before making the move stick into Stowe on Lap 20.
It made for a McLaren one-two with Hamilton third from Russell, while Verstappen was five seconds back from the lead in fifth and Sainz not far further back.
Four drivers had pitted for intermediate tyres; Zhou, Ocon, Perez, and Leclerc. It was the wrong call, the quartet all slower than those on slicks.
On Lap 24, DRS was enabled once more as conditions improved.
It was brief, as just two minutes later DRS was disabled as the rain closed back in.
A moment from Norris out front saw Piastri close in, the pair split by six-tenths as they completed Lap 26.
As they did, Verstappen and Sainz boxed for intermediate tyres.
McLaren called Norris in at the end of the lap, Piastri left out for another lap as he ran close to his team-mate.
He could have been double-stacked, there was enough time for Piastri to slow back towards Hamilton, opening a window into which Norris could be serviced ahead of his own stop.
The Australian was called in on the following lap, his lead less than three seconds over Norris by the time he peeled off into the lane such was the time loss he suffered with that one extra lap.
He dropped from second on the road to sixth as a consequence, his challenge at the front of the race extinguished.
On Lap 29, once everyone had swapped to intermediate tyres, the order was Norris from Hamilton with Verstappen third courtesy of an early call onto grooved rubber.
Piastri in sixth was 18.5s back from his team-mate, with Ricciardo holding 14th.
The rain that had turned the race on its head soon eased, and on Lap 32 it had all but stopped.
Russell’s race came to an end on Lap 34, pulling the car into retirement with a suspected water system issue.
It left the order Norris from Hamilton, who was closing on the leader, from Verstappen, Sainz, and Piastri, who was stuck behind the Ferrari.
With 15 laps remaining, the sun broke back through as the track moved back towards the cross over point for slicks.
The pit lane became a hive of activity on Lap 38, RB and Haas fitting soft tyres.
Hamilton was in next time around, swapping onto the soft tyres while Verstappen was also in for a set of hards.
McLaren also called in Piastri, swapping him onto a brand new set of medium tyres.
The race leader stopped next time around, also taking on a set of soft tyres, skating long in the box to delay his exit. It was the decisive moment of the race.
The two second delay was costly, Hamilton leading from Norris with Verstappen third and Piastri fourth.
The leading two were on soft tyres, with Verstappen on hards and Piastri mediums, the Australian the fastest man on the track on a tyre Norris could have fitted.
Hamilton held a 2.3s advantage over Norris as they started Lap 42, with Verstappen 3.3s further back in third and Piastri 10s down the road.
The Red Bull Racing driver was charging, reeling in the race leader at half a second per lap.
Norris was making no real inroads on Hamilton ahead as he came under increasing pressure to maintain second from Verstappen.
Midway around Lap 47, the championship leader moved within DRS range, closing in over the next lap to complete the move down the Hangar Straight.
Behind them, Piastri was the fastest man on the track, highlighting the strategic error McLaren had made in fitting the soft tyres for Norris.
Once clear of Norris, Verstappen closed the gap on Hamilton but never enough to challenge.
It saw the Mercedes driver take victory by 1.4 seconds over the Red Bull driver, with Norris third and Piastri fourth for McLaren.
Sainz scored the point for fastest lap on the final lap as he finished fifth with Hulkenberg an impressive sixth for Haas.
The balance of the top 10 was made up on Lance Stroll, Fernando Alonso, Alex Albon, and Yuki Tsunoda.